#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
using namespace std;

//滑动窗口的最大值，双向队列
vector<int> maxInWindows(const vector<int> &num, unsigned int size)
{
    deque<int> q;
    vector<int> res;
    for(int i = 0; i < num.size(); ++i)
    {
        if(!q.empty() && q.front() == i - size)
        {
            q.pop_front();
        }
        while(!q.empty() && num[i] > num[q.back()])
        {
            q.pop_back();
        }
        q.push_back(i);
        if(i >= size - 1)
        {
            res.push_back(num[q.front()]);
        }
    }
    return res;
}

void test()
{
}

int main()
{
    test();
    return 0;
}